﻿using QDT.Core.Deals;
using QDT.Core.Projects;

namespace QDT.Services.Deals
{
    public interface IDealService
    {
        /// <summary>
        /// 投资用户投资项目操作方法
        /// </summary>
        Credit Bid(int userid, int projectid, decimal money, bool isAuto = false);

        /// <summary>
        /// 获得Project的还款信息表
        /// </summary>
        /// <param name="projectId">项目ID</param>
        /// <returns></returns>
        RepaymentScheme GetRepaymentScheme(int projectId);

        /// <summary>
        /// 还款
        /// </summary>
        /// <param name="projectId">贷款ID</param>
        /// <param name="stage">还款第几期，如果设置0或者不填写，默认还当前最新一期</param>
        /// <param name="adminId">管理员ID</param>
        void Refund(int projectId, int stage = 0, int adminId = 0);
        /// <summary>
        /// 流标
        /// </summary>
        void Bad(int projectId);
    }
}
